package com.shioirikukuri.service.impl;

import com.shioirikukuri.entity.SpecialPrice;
import com.shioirikukuri.mapper.SpecialPriceMapper;
import com.shioirikukuri.service.ISpecialPriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpecialPriceServiceImpl implements ISpecialPriceService {

	@Autowired
	private SpecialPriceMapper specialPriceMapper;

	@Override
	public List<SpecialPrice> getAllSpecialPrices() {
		return specialPriceMapper.selectAllSpecialPrices();
	}

	@Override
	public SpecialPrice getSpecialPriceById(Integer priceId) {
		return specialPriceMapper.selectSpecialPriceById(priceId);
	}

	@Override
	public void createSpecialPrice(SpecialPrice specialPrice) {
		specialPriceMapper.insertSpecialPrice(specialPrice);
	}

	@Override
	public void updateSpecialPrice(SpecialPrice specialPrice) {
		specialPriceMapper.updateSpecialPrice(specialPrice);
	}

	@Override
	public void deleteSpecialPriceById(Integer priceId) {
		specialPriceMapper.deleteSpecialPriceById(priceId);
	}
}